/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/idenger">idenger</a> All rights reserved.
 */
package com.idenger.modules.edu.service.exercisehistory;

import java.util.List;

import com.idenger.common.persistence.Page;
import com.idenger.common.service.CrudService;
import com.idenger.modules.edu.entity.exercisehistory.EduExerciseHistory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.idenger.modules.edu.dao.exercisehistory.EduExerciseHistoryDao;

/**
 * 用户做练习记录Service
 * @author 兰正军
 * @version 2017-12-04
 */
@Service
@Transactional(readOnly = true)
public class EduExerciseHistoryService extends CrudService<EduExerciseHistoryDao, EduExerciseHistory> {

	public EduExerciseHistory get(String id) {
		return super.get(id);
	}

	public EduExerciseHistory findDoPracticeMaxScoreByUserIdAndPracticeId(EduExerciseHistory eduExerciseHistory) {
		return dao.findDoPracticeMaxScoreByUserIdAndPracticeId(eduExerciseHistory);
	}



	public List<EduExerciseHistory> findList(EduExerciseHistory eduExerciseHistory) {
		return super.findList(eduExerciseHistory);
	}
	
	public Page<EduExerciseHistory> findPage(Page<EduExerciseHistory> page, EduExerciseHistory eduExerciseHistory) {
		return super.findPage(page, eduExerciseHistory);
	}
	
	@Transactional(readOnly = false)
	public void save(EduExerciseHistory eduExerciseHistory) {
		super.save(eduExerciseHistory);
	}
	
	@Transactional(readOnly = false)
	public void delete(EduExerciseHistory eduExerciseHistory) {
		super.delete(eduExerciseHistory);
	}
	@Transactional(readOnly = false)
	public void updateHistoryForUserId(String updUserId,String userId){
		dao.updateHistoryForUserId(updUserId, userId);
	}
	
}